package com.xuan.webfinally.mapper;

import com.xuan.webfinally.entity.SlopeCamera;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 边坡视频信息表 Mapper 接口
 * </p>
 *
 * @author gyuxuan
 * @since 2025-05-18
 */
public interface SlopeCameraMapper extends BaseMapper<SlopeCamera> {

    /**
     * 获取边坡视频
//     * @param deptId 部门id
     * @return 视频地址
     */
    @Select("select video_url from slope_camera where dept_id = #{deptId} and camera_status = '在线' Limit 1")
    String getVedio(Long deptId);

    @Select("select video_url from slope_camera")
    List<String> getVedios();
    @Select("select dept_id from slope_camera where video_url = #{x}")
    Long getVedioDeptId(String x);


}
